<?php

namespace CMS\Page\Models;
/**
 * Trida entity pro tabulku stranek (page). 
 *
 * @author David Dusek
 */
use Doctrine\ORM\Mapping as ORM;

/** 
 * @ORM\Entity
 * @ORM\Table(name="page")
 */
class Page extends \Nette\Object {
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue
     * @var int 
     */
    private $id;

    /**
     * @ORM\Column(length=100)
     * @var string 
     */
    private $name;    
    
    /**
     * @ORM\Column(length=100)
     * @var string 
     */
    private $title;
    
     /**
     * @ORM\Column(type="text")
     * @var string 
     */
    private $keywords;
    
    /**
     * @ORM\Column(type="text")
     * @var string 
     */
    private $description;   
    
    /**
     * @ORM\Column(name="content", type="text")
     * @var string 
     */
    private $contentText;
    
    /**
     * @ORM\Column(type="string", length=255)
     * @var string 
     */
    private $layout;
    
    /**
     * @ORM\OneToOne(targetEntity="Content", cascade={"persist", "remove"})
     * @var \CMS\Page\Models\Content 
     */
    private $content;
    
    public function __construct() {
        $this->content = new Content();
    }
    
    public function getId() {
        return $this->id;
    }
    
    public function setName($name) {
        $this->name = $name; 
    }

    public function getName() {
        return $this->name;
    }
    
    public function setTitle($title) {
        $this->title = $title; 
    }

    public function getTitle() {
        return $this->title;
    }

    public function setKeywords($keywords) {
        $this->keywords = $keywords; 
    }

    public function getKeywords() {
        return $this->keywords;
    }

    public function setDescription($description) {
        $this->description = $description; 
    }

    public function getDescription() {
        return $this->description;
    }

    public function setContentText($contentText) {
        $this->contentText = $contentText; 
    }

    public function getContentText() {
        return $this->contentText;
    }
   
    public function setLayout($layout) {
        $this->layout = $layout; 
    }

    public function getLayout() {
        return $this->layout;
    }
    
    public function setContent(Content $content) {
        $this->content = $content; 
    }

    public function getContent() {
        return $this->content;
    }
}
